package com.example.springbootrabbitmqconsumer.consumer;

import com.example.springbootrabbitmqconsumer.config.RabbitConfig;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: Ah Nan
 * @Description: 消费者
 * @Date: 15:40 2020/6/24
 */
@Component
@RabbitListener(queues = RabbitConfig.secondQueue)
public class SecondConsumer {

    @RabbitHandler
    public void process(String msg) {
        System.out.println("Second Queue received msg : " + msg);
    }
}
